package day7.zy1;
import java.io.*;
import java.net.Socket;
import java.util.Scanner;

public class LoginTest {
    public static void main(String[] args) {
        try {
            Socket socket =new Socket("localhost",8888);
            InputStream in =socket.getInputStream();
            OutputStream out =socket.getOutputStream();
            BufferedReader br =new BufferedReader(new InputStreamReader(in));
            PrintWriter pw =new PrintWriter(out,true);
            pw.println("王五");
            pw.println("wangwu");
            String reply =br.readLine();
            System.out.println("服务器说:"+reply);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
